From: kaf24@firebug.cl.cam.ac.uk Date: Tue, 13 Jun 2006 14:33:10 +0000 (+0100) Subject: [LINUX] A better way to stop blkdev request handling in blkfront X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15955^2~19 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=423ce9cf9ec308803807737cf104a3c0f17237f4;p=xen.git [LINUX] A better way to stop blkdev request handling in blkfront driver. Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index bb71828909..1a2156600d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -596,8 +596,7 @@ void do_blkif_request(request_queue_t *rq) continue; } - if (unlikely(info->connected != BLKIF_STATE_CONNECTED) || - RING_FULL(&info->ring)) + if (RING_FULL(&info->ring)) goto wait; DPRINTK("do_blk_req %p: cmd %p, sec %lx, " @@ -697,6 +696,7 @@ static void blkif_free(struct blkfront_info *info, int suspend) spin_lock_irq(&blkif_io_lock); info->connected = suspend ? BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED; + blk_stop_queue(info->rq); /* no more blkif_request() */ spin_unlock_irq(&blkif_io_lock); /* Free resources associated with old device channel. */